package com.dongzili;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @描述：
 * @作者： 96511
 * @日期： 2024-12-21 22:48
 */

@EnableDiscoveryClient
@SpringBootApplication
public class GatewayApplication {
    public static void main(String[] args) {
//        SpringApplication.run(XnyyEduGatewayApplication.class, args);

        ConfigurableApplicationContext applicationContext = SpringApplication.run(GatewayApplication.class, args);
        String name = applicationContext.getEnvironment().getProperty("spring.cloud.gateway.routes[0].id");
        String name1 = applicationContext.getEnvironment().getProperty("spring.cloud.gateway.routes[1].id");
        String post = applicationContext.getEnvironment().getProperty("spring.cloud.gateway.discovery.locator.enabled");
        System.out.println("name :"+name);
        System.out.println("name1 :"+name1);
        System.out.println("post :"+post);
    }


}
